{include file="/home/geeka813/public_html/smarty_templates/common.tpl"}
 	

	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
	

  	<link href='{$syntax_path}/styles/shCore.css' rel='stylesheet' type='text/css' />
  	<link href='{$syntax_path}/styles/shThemeDefault.css' rel='stylesheet' type='text/css' />
  	<script src='{$syntax_path}/scripts/shCore.js' type='text/javascript'></script>
  	<script src='{$syntax_path}/scripts/shAutoloader.js' type='text/javascript'></script>
  	<script src='{$syntax_path}/scripts/shBrushXml.js' type='text/javascript'></script>
  	<script src='{$syntax_path}/scripts/shBrushJScript.js' type='text/javascript'></script>
  	<script src='{$syntax_path}/scripts/shBrushCss.js' type='text/javascript'></script>
	
	<!-- Container -->
	<section class="container row clearfix">
		<header class="clearfix">
			<nav id="main-menu" class="left navigation">
				<ul class="sf-menu no-bullet inline-list m0">
					<li><a href="index.php" class="active">Home</a></li>
					
					{foreach $menu1 as $menuItem}
					<li><a href="#">{$menuItem->name}</a>
						<ul class="sub-menu">
							{foreach $menuItem->submenus as $subMenuItem}
							<li><a href="{$subMenuItem->link}">{$subMenuItem->name}</a></li>
							{/foreach}
						</ul>
		    			</li>
		    			{/foreach}
				</ul>
			</nav>

			
		</header>

		<!-- Inner Container -->
		<section class="inner-container clearfix">
		
			<!-- Content -->
			
			<section id="content" class="twelve column row pull-left">
			
				<section class="row">
				
					<article>
					        <h3 class="post-title">Selectors</h3>

						<!-- You also need to add some content to highlight, but that is covered elsewhere. -->
                                                <pre class="brush: js">
                                                
                                                   // id selector
                                                
                                                   <input id="myinput" value="33"/>
                                                
                                                   $('#myinput').val();
                                                
                                                </pre>
                                                
                                                <pre class="brush: js">
                                            
                                                   // id selector but restrict to search to a given container selector
                                                
                                                   <div id="mycontainer">
                                                      <div id="fred">
                                                    
                                                      </div>
                                                   </div>
                                                
                                                   var fredDiv = $('#fred','#mycontainer');
                                                
                                                   // alternative way
                                                
                                                  var fredDiv = $('#mycontainer').find('#fred');
                                                
                                             
                                                </pre>
                                                
                                                
                                                <pre class="brush: js">
                                                  <input type="radio" checked="checked" value="summary" name="reportType"/>
                                                  <input type="radio" value="detailed" name="reportType"/>
                                                
                                                   // get selected radio item that is checked
                                                   
                                                   $("'input[name=reportType]:checked'").val(); // returns summary
                                                </pre>
                                                
                                                
                                            	<h3 class="post-title">Applying Class changes</h3>
                                            	
                                            	   <pre class="brush: js">
                                            	      $('#myButton').removeClass('buttonDisabledGrey');
                                                      $('#myButton').addClass('buttonPurple fWidth90');
                                                      $('#myButton').attr('disabled', '');
                                            	   </pre>
                                            	   
                                                <h3 class="post-title">JSON Parsing</h3>
                                                
                                                <pre class="brush: js">
                                            	      
                                            	      try
                                                      {
                                                         var data = jQuery.parseJSON(response);
                                                      }
                                                      catch(e)
                                                      {
                                                         alert("Caught jquery json exception");
                                                      }

                                            	</pre>
                                                
                                                
                                                <h3 class="post-title">Form Handling</h3>
                                                
                                                <pre class="brush: js">
                                                
                                                   // form function to allow form to be submitted via Ajax or Traditional form submit
                                                   
                                                   $("#myform").submit(function(event) {

                                                        if(postSubmit === 0)
                                                        {
                                                           event.preventDefault();
                                                           doOtherThings(); // this could include ajax submit
                                                           // return false to prevent post submit
                                                           return false;
                                                        }
                                                        else
                                                        {
                                                           doSomePreSubmitLogic();
                                                           // return true to allow form to submit
                                                           return true;
                                                        }
                                                   });

                                                

                                            	      
                                            	</pre>
                                            	
                                            	
                                            	<h3 class="post-title">Ajax</h3>
                                                
                                                <pre class="brush: js">
                                                
                                                        // now create and send the request
                                                        $.ajax({
                                                           type: "POST",
                                                           url: "/relative/to/current/page",
                                                           timeout:60000,
                                                           data: parameters,
                                                           success: function (response) { 

                                                              handleResponse(response);
                                                           },
                                                           error: function(x, t, n) {

                                                              // TODO output some error message

                                                              alert("Chart request failed");


                                                           }
                                                         });    
                                            	</pre>
                                            	
                                            	<h3 class="post-title">Date Picker</h3>
                                                
                                                <pre class="brush: js">
                                            	      
                                            	      // initialisation
                                            	      
                                            	      $(document).ready(function() {
                                                         // Handler for .ready() called.

                                                         $(function() {
                                                            $('.datepicker').datepicker({
                                                               showOn: "button",
                                                               buttonImage: "/images/calbtn.gif",
                                                               buttonImageOnly: true,
                                                               dateFormat: "dd-mm-yy",
                                                               buttonText: "Click to change date"
                                                            }).datepicker("setDate", "0");
                                                            
                                                          });
                                                          
                                                        });
                                                        
                                                        $("[name='startHour']").val('00');
                                                        $("[name='startMinute']").val('00');
                                                        $("[name='endHour']").val('23');
                                                        $("[name='endMinute']").val('59');

                                                        
                                                        // extracting values
                                                        
                                                        


                                            	</pre>

					</article>
				
				</section>
				
			</section>

			<!-- Footer -->
			<footer class="row clearfix">

				<div class="copyright clearfix">
					© Copyright 2013 Geekawhat
				</div>

				<div id="back-to-top" class="right">
					<a href="#top">Back to Top</a>
				</div>
			</footer>
			<!-- End Footer -->
		</section>
		<!-- End Inner Container -->
	</section>
	<!-- End Container -->

	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/jquery.superfish.js"></script>
	<script type="text/javascript" src="js/jquery.flexslider.min.js"></script>
	<script type="text/javascript" src="js/jquery.fancybox.js"></script>
	<script type="text/javascript" src="js/jcarousel.js"></script>
	<script type="text/javascript" src="js/jquery.masonry.min.js"></script>
	<script type="text/javascript" src="js/script.js"></script>
	
	<!-- Finally, to actually run the highlighter, you need to include this JS on your page -->
        <script type="text/javascript">
           SyntaxHighlighter.all()
        </script>
</body>
</html>